﻿// <copyright file="api.models.tt" company="Wicture">
//  Copyright ? . All Rights Reserved.
// </copyright>
using System;
using System.Collections.Generic;

namespace Wicture.EPC.Service.Benz
{
    public class AjaxResult<T>
    {
        public string statusCode { get; set; }
        public string errorMessage { get; set; }
        public T data { get; set; }
    }

    public class Pagination
    {
        public int totalCount { get; set; }
        public int pageSize { get; set; }
        public int pageIndex { get; set; }
    }

    public partial class Get_Model_InfoParam
    {
        public string id { get; set; }
        public string vin { get; set; }
        public string brandCode { get; set; }
    }

    public partial class Get_Model_InfoResult
    {
        public string modelId { set; get; }
        public string selectorId { set; get; }
        public string vin { get; set; }
        public string code { get; set; }
        public string name { get; set; }
        public string brandCode { get; set; }
        public string brandName { get; set; }
        public string description { get; set; }
        public string imageUrl { get; set; }
        public partial class _props
        {
            public string key { get; set; }
            public string value { get; set; }
        }
        public List<_props> props { get; set; }
        public partial class _features
        {
            public string key { get; set; }
            public string value { get; set; }
        }
        public List<_features> features { get; set; }
        public partial class _vins
        {
            public string vin { get; set; }
        }
        public List<_vins> vins { get; set; }
    }

    public partial class Query_MainGroupParam
    {
        public string id { get; set; }
        public string vin { get; set; }
        public string brandCode { get; set; }
    }

    public partial class Query_MainGroupResult
    {
        public string id { get; set; }
        public string code { get; set; }
        public string name { get; set; }
        public string imageUrl { get; set; }
        public int? selectorId { get; set; }
        public bool? hasNext { get; set; }
        public string route { get; set; }
        public bool? isSelected { get; set; }
        public bool isBelongTo { set; get; } = true;
    }

    public partial class Query_SubGroupParam
    {
        public string id { get; set; }
        public string vin { get; set; }
        public string brandCode { get; set; }
        public int? selectorId { get; set; }
        public string keyword { get; set; }
    }

    public partial class Query_SubGroupResult
    {
        public string id { get; set; }
        public string code { get; set; }
        public string name { get; set; }
        public string mainGroupId { get; set; }
        public string mainGroupCode { get; set; }
        public string description { get; set; }
        public bool belongTo { get; set; }
        public string imageUrl { get; set; }
        public string imageSN { get; set; }
        public string remark { get; set; }
        public string applicableModel { get; set; }
        public int? selectorId { get; set; }
    }

    public partial class Query_HotPointsParam
    {
        public string id { get; set; }
        public string brandCode { get; set; }
        public string vin { get; set; }
        public string selectorId { get; set; }
    }

    public partial class Query_HotPointsResult
    {
        public partial class _imgs
        {
            public string url { get; set; }
            public partial class _points
            {
                public string sn { get; set; }
                public string x { get; set; }
                public string y { get; set; }
                public string w { get; set; }
                public string h { get; set; }
            }
            public List<_points> points { get; set; }
        }
        public List<_imgs> imgs { get; set; }
    }

    public partial class Model_SelectorParam
    {
        public string id { get; set; }
        public string route { get; set; }
        public string brandCode { get; set; }
        public string vin { get; set; }
    }

    public partial class Model_SelectorResult
    {
        public string title { get; set; }
        public partial class _items
        {
            public string id { get; set; }
            public string name { get; set; }
            public bool hasNext { get; set; }
            public string route { get; set; }
            public string code { get; set; }
            public string imageUrl { set; get; }
        }
        public List<_items> items { get; set; }
    }

    public partial class Query_Part_DetailParam
    {
        public string brandCode { get; set; }
        public string partId { get; set; }
        public int? selectorId { get; set; }
    }

    public partial class Query_Part_DetailResult
    {
        public int id { get; set; }
        public string partCode { get; set; }
        public string partName { get; set; }
        public string brandCode { get; set; }
        public string brandName { get; set; }
        public string unit { get; set; }
        public decimal? cost { get; set; }
        public decimal? price { get; set; }
        public string priceFC { get; set; }
        public string remark { get; set; }
        public DateTime? priceUpdatedAt { get; set; }
        public int? stock { get; set; }
        public partial class _replacements
        {
            public string brandCode { get; set; }
            public string brandName { get; set; }
            public string partCode { get; set; }
            public string partName { get; set; }
            public decimal? cost { get; set; }
            public decimal? price { get; set; }
            public DateTime? priceUpdatedAt { get; set; }
            public int? stock { get; set; }
        }
        public List<_replacements> replacements { get; set; }
        public partial class _props
        {
            public string key { get; set; }
            public string value { get; set; }
        }
        public List<_props> props { get; set; }
        public string modelCode { get; set; }
        public string modelName { get; set; }
        public string quantity { get; set; }
        public string replacementPartNo { get; set; }
        public string mainGroupCode { get; set; }
        public string mainGroupName { get; set; }
        public string subGroupCode { get; set; }
        public string subGroupName { get; set; }
        public int? firstYear { get; set; }
        public int? lastYear { get; set; }
        public string imageSN { get; set; }
        public string series { get; set; }
        public string partNameEn { get; set; }
        public string imageUrl { get; set; }
        public string smallImageUrl { get; set; }
    }

    public partial class Query_FitModelsResult
    {
        public partial class _models
        {
            public string brandCode { set; get; }
            public string partId { get; set; }
            public string description { get; set; }
            public string mainGroupId { get; set; }
            public string mainGroupCode { get; set; }
            public string mainGroupName { get; set; }
            public string subGroupId { get; set; }
            public string subGroupCode { get; set; }
            public string subGroupName { get; set; }
            public string imageSN { get; set; }
            public string imageUrl { get; set; }
            public string selectorId { set; get; }
            public partial class _props
            {
                public string key { get; set; }
                public string value { get; set; }
            }
            public List<_props> props { get; set; }
            public partial class _imgs
            {
                public string partId { get; set; }
                public string url { get; set; }
                public partial class _points
                {
                    public string sn { get; set; }
                    public string x { get; set; }
                    public string y { get; set; }
                    public string w { get; set; }
                    public string h { get; set; }
                }
                public List<_points> points { get; set; }
            }
            public List<_imgs> imgs { get; set; }
        }
        public List<_models> items { get; set; }
        public Pagination pagination { get; set; }
    }
    public partial class Query_PartsParam
    {
        public string id { get; set; }
        public string vin { get; set; }
        public string brandCode { get; set; }
        public int? selectorId { get; set; }
        public string keyword { get; set; }
    }

    public partial class Query_PartsResult
    {
        public string id { get; set; }
        public string partCode { get; set; }
        public string nameZh { set; get; }
        public string partDescriptionZh { set; get; }
        public string partName
        {
            get
            {
                var deep = 0;
                int.TryParse(indent, out deep);
                var retName = "";
                while (deep > 0)
                {
                    retName += '●';
                    deep--;
                }
                if (!string.IsNullOrEmpty(retName))
                {
                    retName += " ";
                }
                retName += nameZh;

                return retName;
            }
        }
        public string imageSN { get; set; }
        public decimal price { get; set; }
        public decimal cost { get; set; }
        public int? stock { get; set; }
        public string mainGroupCode { get; set; }
        public string subGroupCode { get; set; }
        public bool belongToVin { get; set; }
        public string quantity { get; set; }
        public string description { get; set; }
        public string modelName { get; set; }
        public string brandCode { get; set; }
        public string brandName { get; set; }
        public string series { get; set; }
        public int? firstYear { get; set; }
        public int? lastYear { get; set; }
        public DateTime? priceUpdatedAt { get; set; }
        public int? selectorId { get; set; }
        public string codeB { get; set; }
        public string steering { get; set; }
        public string footNotes { set; get; }
        public string indent { set; get; }
        public string repType { set; get; }
        public string reppno { set; get; }
        /// <summary>
        /// codeB中决定筛选逻辑的saCode的个数如423/494个数为1，423+494/423+625个数为2
        /// </summary>
        public int saCodeCount { get; internal set; }
        public string posAddr { get; set; }
        public string modelNotes
        {
            get
            {
                string retName = "";
                if (!string.IsNullOrEmpty(codeB))
                {
                    retName += $"代码:{codeB}";
                }
                if (!string.IsNullOrEmpty(footNotes))
                {
                    retName += $"; 脚注:{footNotes}";
                }
                return retName.Trim(';').Trim();
            }
        }
        public string notes
        {
            get
            {
                string retName = "";
                if (!string.IsNullOrEmpty(partDescriptionZh))
                {
                    retName += $"{partDescriptionZh}";
                }
                if (!string.IsNullOrEmpty(repType))
                {
                    retName += $"; 替换为:{repType}{reppno?.Trim()}";
                }
                return retName.Trim(';').Trim();
            }
        }
        public string replacedPartCodes { get { return $"{repType}{reppno?.Trim()}"; } }
        public string colorCode { set; get; }
    }

    public partial class Query_Group_PartsParam
    {
        public int pageSize { get; set; }
        public int pageIndex { get; set; }
        public int? groupId { get; set; }
        public string keyword { get; set; }
    }

    public partial class Query_Group_PartsResult
    {
        public string img { get; set; }
        public partial class _items
        {
            public int id { get; set; }
            public int position { get; set; }
            public string partCode { get; set; }
            public string partName { get; set; }
            public decimal cost { get; set; }
            public decimal sellingPrice { get; set; }
            public string sellingPriceFC { get; set; }
            public DateTime priceUpdatedAt { get; set; }
        }
        public List<_items> items { get; set; }
        public Pagination pagination { get; set; }
    }

    public partial class Check_Sub_Group_ImageParam
    {
        public string brandCode { get; set; }
        public string type { get; set; }
    }

    public partial class Check_Sub_Group_ImageResult
    {
    }

    public partial class Sync_Part_To_AccessoriesParam
    {
        public string brandCode { get; set; }
    }

    public partial class Sync_Part_To_AccessoriesResult
    {
        public int count { get; set; }
    }

    public partial class Query_MainGroup_ExtendParam
    {
        public string id { get; set; }
        public string brandCode { get; set; }
    }

    public partial class Query_MainGroup_ExtendResult
    {
        public string id { get; set; }
        public string code { get; set; }
        public string name { get; set; }
        public string imageUrl { get; set; }
        public int? selectorId { get; set; }
    }

    public partial class Query_VinParam
    {
        public string vin { get; set; }
    }

    public partial class Query_VinResult
    {
        public string vin { get; set; }
        public string brandName { get; set; }
        public string brandCode { get; set; }
        public partial class _props
        {
            public string name { get; set; }
            public string desc { get; set; }
        }
        public List<_props> props { get; set; }
        public partial class _features
        {
            public string code { get; set; }
            public string name { get; set; }
        }
        public List<_features> features { get; set; }
        public partial class _vins
        {
            public string vin { get; set; }
        }
        public List<_vins> vins { get; set; }
    }
    public partial class Query_CrumbResult
    {
        public string id { set; get; }
        public string code { set; get; }
        public string name { set; get; }
        public int step { set; get; }
        public string fieldCode { set; get; }
        public string fieldName { set; get; }
        public string route { set; get; }
        public string selectorId { set; get; }

    }

    public class QuickPartResult
    {
        public string partCode { get; set; }
        public string partName { get; set; }
        public string replacedPartCodes { get; set; }
        public string marketCode { get; set; }
        public string marketName { get; set; }
        public decimal? cost { get; set; }
        public decimal? price { get; set; }
        public int? stock { get; set; }
        public DateTime? priceUpdatedAt { get; set; }
    }
}

